<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>WebGL带来了3D图像功能</title>
    <script src="./libs/three.js"></script>
</head>
<body>
    <script type="text/javascript">
    var renderer = new THREE.WebGLRenderer({
      antialias:true
    });
    renderer.setSize(400, 300);
    document.body.appendChild(renderer.domElement);
    var camera = new THREE.PerspectiveCamera( 60, 400 / 300, 1, 5000 );
    camera.position.z = 500;
    var scene = new THREE.Scene();
    var cube = new THREE.Mesh(
         new THREE.BoxGeometry( 200, 200, 200 ),
         new THREE.MeshBasicMaterial( { color: 0x6699cc, wireframe: true } )
    );
    cube.rotation.x = 0.5;
    cube.rotation.y = 0.5;
    scene.add(cube);

    renderer.render( scene, camera );
    </script>
</body>
</html>
